/**
 * Created by YJH on 2018/5/25.
 */

import React, {Component, PropStyles} from 'react';
import {
    View,
    Image,
    Text,
    StyleSheet,
    Button,
} from 'react-native';

export default class HomePage extends Component<Props>{
    constructor(props){
        super(props);
    }

    static navigationOptions={
        title:'首页'
    }

    render(){
        const {navigation} = this.props;
        return (
            <View style={styles.container}>
                <Text style={styles.text}>首页美女展示</Text>
                <Button style={styles.button} title='点击进入腾讯' onPress={()=>{
                    navigation.navigate('TencentPage')
                }}/>
                <Button style={styles.button} title='点击进入阿里' onPress={()=>{
                    navigation.navigate('AlibabaPage', {name:'动态'})
                }}/>
                <Button style={styles.button} title='点击进入百度' onPress={()=>{
                    navigation.navigate('BaiduPage', {title:'百度已入住'})
                }}/>

                <Button style={styles.button} title='点击进入TabNavigator' onPress={()=>{
                    navigation.navigate('TabNavi')
                }}/>
                <Button style={styles.button} title='点击进入AppDrawerNavigator' onPress={()=>{
                    navigation.navigate('AppDrawerNavigator')
                }}/>
            </View>
        )
    }
}


const styles=StyleSheet.create({
    container:{
        flex:1,
        backgroundColor:'#FBFBFF',
    },
    text:{
        fontSize:20,
        marginTop:10,
        alignSelf:'center',
    },
    button:{
        height:50,
        marginTop:30,
        alignSelf:'center',
    },
})
